home *** CD-ROM | disk | FTP | other *** search
/ Cookbook USA: Drips, Dressings & Sauces / Cookbook USA - Drips, Dressings & Sauces (1997)(MicroMedia).iso / ch15 / frmreadm.frm < prev    next >
Text File  |  1996-07-06  |  7KB  |  258 lines

  1. VERSION 2.00
  2. Begin Form frmReadMe 
  3.    BackColor       =   &H00FFFF80&
  4.    Caption         =   "Online Instruction Guide"
  5.    ClientHeight    =   6675
  6.    ClientLeft      =   3345
  7.    ClientTop       =   3285
  8.    ClientWidth     =   7410
  9.    Height          =   7080
  10.    Icon            =   FRMREADM.FRX:0000
  11.    Left            =   3285
  12.    LinkTopic       =   "Form3"
  13.    ScaleHeight     =   6675
  14.    ScaleWidth      =   7410
  15.    Top             =   2940
  16.    Width           =   7530
  17.    Begin CommandButton Demo30 
  18.       Caption         =   "New Version 3.0 Features"
  19.       Height          =   435
  20.       Left            =   375
  21.       TabIndex        =   10
  22.       Top             =   5205
  23.       Width           =   6720
  24.    End
  25.    Begin FileListBox filReadChecker 
  26.       Height          =   420
  27.       Left            =   315
  28.       TabIndex        =   9
  29.       Top             =   6090
  30.       Visible         =   0   'False
  31.       Width           =   375
  32.    End
  33.    Begin CommandButton CmdExit 
  34.       BackColor       =   &H00FF0000&
  35.       Caption         =   "E&xit"
  36.       Height          =   495
  37.       Left            =   5865
  38.       TabIndex        =   8
  39.       Top             =   5835
  40.       Width           =   1215
  41.    End
  42.    Begin CommandButton cmdCopyright 
  43.       BackColor       =   &H00FF0000&
  44.       Caption         =   "Copy&rights and Permissions"
  45.       Height          =   495
  46.       Left            =   360
  47.       TabIndex        =   7
  48.       Top             =   4560
  49.       Width           =   6735
  50.    End
  51.    Begin CommandButton cmdTechSupport 
  52.       BackColor       =   &H00FF0000&
  53.       Caption         =   "Getting &Technical Support"
  54.       Height          =   495
  55.       Left            =   360
  56.       TabIndex        =   6
  57.       Top             =   3960
  58.       Width           =   6735
  59.    End
  60.    Begin CommandButton cmdPrinting 
  61.       BackColor       =   &H00FF0000&
  62.       Caption         =   "&Printing and Saving a Recipe"
  63.       Height          =   495
  64.       Left            =   360
  65.       TabIndex        =   5
  66.       Top             =   3360
  67.       Width           =   6735
  68.    End
  69.    Begin CommandButton cmdDisplaying 
  70.       BackColor       =   &H00FF0000&
  71.       Caption         =   "&Displaying the Recipe"
  72.       Height          =   495
  73.       Left            =   360
  74.       TabIndex        =   4
  75.       Top             =   2760
  76.       Width           =   6735
  77.    End
  78.    Begin CommandButton cmdSearching 
  79.       BackColor       =   &H00FF0000&
  80.       Caption         =   "&Searching for a Recipe"
  81.       Height          =   495
  82.       Left            =   360
  83.       TabIndex        =   3
  84.       Top             =   2160
  85.       Width           =   6735
  86.    End
  87.    Begin CommandButton cmdBrowsing 
  88.       BackColor       =   &H00FF0000&
  89.       Caption         =   "&Browsing through the Recipes"
  90.       Height          =   495
  91.       Left            =   360
  92.       TabIndex        =   2
  93.       Top             =   1560
  94.       Width           =   6735
  95.    End
  96.    Begin CommandButton cmdOverview 
  97.       BackColor       =   &H00FF0000&
  98.       Caption         =   "&Overview of Cookbook U.S.A. Software"
  99.       Height          =   495
  100.       Left            =   360
  101.       TabIndex        =   1
  102.       Top             =   960
  103.       Width           =   6735
  104.    End
  105.    Begin CommandButton cmdInstallation 
  106.       BackColor       =   &H00FF0000&
  107.       Caption         =   "&Installation Instructions"
  108.       Height          =   495
  109.       Left            =   360
  110.       TabIndex        =   0
  111.       Top             =   360
  112.       Width           =   6735
  113.    End
  114. End
  115. ' frmReadme displays the contents of each of the README.DAT
  116. ' files, and the user may click on whichever subject is
  117. ' of interest.  This loads frmReader, which displays the
  118. ' full text of that subject.  Clicking Exit will return
  119. ' to frmMain.
  120. Option Explicit
  121.  
  122. '--------------------------------------------------------------------------
  123. Sub cmdBrowsing_Click ()
  124.  
  125.     GoFormReader "READ3.DAT", "Browsing Through the recipes"
  126.  
  127. End Sub
  128.  
  129. '--------------------------------------------------------------------------
  130. Sub cmdCopyright_Click ()
  131.  
  132.     GoFormReader "READ8.DAT", "Copyrights and Permissions"
  133.  
  134. End Sub
  135.  
  136. '--------------------------------------------------------------------------
  137. Sub cmdDisplaying_Click ()
  138.     
  139.     GoFormReader "READ5.DAT", "Displaying a Recipe"
  140.     
  141. End Sub
  142.  
  143. '--------------------------------------------------------------------------
  144. Sub cmdExit_Click ()
  145.     Unload demo
  146.     Hide
  147.     frmMain.Show
  148.  
  149. End Sub
  150.  
  151. '--------------------------------------------------------------------------
  152. Sub cmdInstallation_Click ()
  153.     
  154.     GoFormReader "READ1.DAT", "Installation Instructions"
  155.  
  156. End Sub
  157.  
  158. '--------------------------------------------------------------------------
  159. Sub cmdOverview_Click ()
  160.     
  161.     GoFormReader "READ2.DAT", "General Overview"
  162.  
  163. End Sub
  164.  
  165. '--------------------------------------------------------------------------
  166. Sub cmdPrinting_Click ()
  167.     
  168.     GoFormReader "READ6.DAT", "Printing and saving recipes"
  169.  
  170. End Sub
  171.  
  172. '--------------------------------------------------------------------------
  173. Sub cmdSearching_Click ()
  174.     
  175.     GoFormReader "READ4.DAT", "Searching for a Recipe"
  176.  
  177. End Sub
  178.  
  179. '--------------------------------------------------------------------------
  180. Sub cmdTechSupport_Click ()
  181.     
  182.     GoFormReader "READ7.DAT", "Obtaining Technical Support"
  183.  
  184. End Sub
  185.  
  186. Sub Demo30_Click ()
  187.     demo.Show
  188.  
  189. End Sub
  190.  
  191. '--------------------------------------------------------------------------
  192. Function fnFileName (filename$, Path$)
  193.     If filename$ = "" Then Exit Function
  194.     If Path$ = "" Then Path = App.Path
  195.     If Right$(Path$, 1) <> "\" Then Path$ = Path$ & "\"
  196.  
  197.     If Left$(filename$, 1) = "\" Then filename$ = Mid$(filename$, 2)
  198.  
  199.     fnFileName = Path$ & filename$
  200.  
  201. End Function
  202.  
  203. Sub Form_Load ()
  204. ' centering the form
  205. Me.Left = (screen.Width - Me.Width) / 2
  206. Me.Top = Abs((screen.Height - Me.Height) / 2)
  207.  
  208. End Sub
  209.  
  210. '--------------------------------------------------------------------------
  211. Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  212.     
  213.     If UnloadMode = 0 Then Call cmdExit_Click
  214.     
  215. End Sub
  216.  
  217. '--------------------------------------------------------------------------
  218. Sub GoFormReader (filename$, Caption$)
  219.     Dim TextBuffer As String
  220.     Dim FileNumber As Integer
  221.     Dim filenum As Integer
  222.     
  223.     'First, check to see if the instruction file is present on the hard drive.
  224.     
  225.     FilReadChecker.Path = App.Path
  226.     FilReadChecker.Pattern = filename$
  227.     If FilReadChecker.ListCount = 0 Then
  228.     'It's not there, get it from the CD-ROM
  229.     FilReadChecker.Path = CDDRIVE$
  230.     FilReadChecker.Pattern = filename$
  231.         If FilReadChecker.ListCount = 0 Then
  232.             MsgBox "The instruction files are not installed correctly.  Please install/re-install Cookbook U.S.A.", 48, "File Error"
  233.             Exit Sub
  234.         End If
  235.     End If
  236.  
  237.     MakeMouseCursorHourglass
  238.     
  239.     Load frmReader
  240.     frmReader.Caption = Caption$
  241.     
  242.     filenum = FreeFile
  243.     Open CDDRIVE$ + filename$ For Input As filenum
  244.     Do Until EOF(filenum)
  245.     Line Input #filenum, TextBuffer$
  246.     frmReader.txtTextViewer = frmReader.txtTextViewer & Chr$(13) & Chr$(10) & TextBuffer$
  247.     Loop
  248.     Close filenum
  249.     frmReader.Show
  250.     Hide
  251.     
  252.     MakeMouseCursorDefault
  253.  
  254.  
  255.  
  256. End Sub
  257.  
  258.